iommu: leave IOMMU enabled by default during kexec crash transition
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Mon, 18 Mar 2019 16:06:37 +0000 (17:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 Mar 2019 16:06:37 +0000 (17:06 +0100)
commit793d669fc1ec682d875514a7f0c2af0e1e21d75e
treeecd92b8019c505238bb14631a5e2d6e5a99daa80
parent1b0e77dd96e29cd3db00402f00b2a75cb8286531
iommu: leave IOMMU enabled by default during kexec crash transition

It's unsafe to disable IOMMU on a live system which is the case
if we're crashing since remapping hardware doesn't usually know what
to do with ongoing bus transactions and frequently raises NMI/MCE/SMI,
etc. (depends on the firmware configuration) to signal these abnormalities.
This, in turn, doesn't play well with kexec transition process as there is
no handling available at the moment for this kind of events resulting
in failures to enter the kernel.

Modern Linux kernels taught to copy all the necessary DMAR/IR tables
following kexec from the previous kernel (Xen in our case) - so it's
currently normal to keep IOMMU enabled. It might require minor changes to
kdump command line that enables IOMMU drivers (e.g. intel_iommu=on /
intremap=on) but recent kernels don't require any additional changes for
the transition to be transparent.

A fallback option is still left for compatibility with ancient crash
kernels which didn't like to have IOMMU active under their feet on boot.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: 12c36f577d454996c882ecdc5da8113ca2613646
master date: 2019-03-12 14:38:12 +0100
docs/misc/xen-command-line.markdown
xen/arch/x86/crash.c
xen/drivers/passthrough/iommu.c